function isSameDay(day1,day2){
    var dateA;
    if (day1 instanceof Date){
        dateA = day1;
    }else {
        dateA = new Date(day1);
    }
    var dateB;
    if (day2 instanceof Date){
        dateB = day2;
    }else {
        new Date(day2);
    }
    return (dateA.setHours(0, 0, 0, 0) == dateB.setHours(0, 0, 0, 0));
}